<!DOCTYPE html>
<html lang="zh-CN">

<head>
   <meta charset="UTF-8">
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <title>记账本</title>
</head>

<body>
   <h1>记账本</h1>
   <hr>
   <button><a href="/account/create">添加账单</a></button>
   <button><a href="/logout">退出登录</a></button>
   <hr>
   <div>
      <% accounts.forEach(item=> { %>
         <div style="border: 3px solid bisque;margin-top: 20px;">
            <div>
               <%= moment(item.time).format('YYYY-MM-DD') %>
            </div>
            <div>
               <%= item.title %>
            </div>
            <div>
               <%= item.type==='-1' ?'支出':'收入' %>
            </div>
            <div>
               <%= item.account %>
            </div>
            <div>
               <%= item.remarks %>
            </div>
            <a href="/account/<%= item._id %>"><span>×</span></a>
         </div>
         <% }) %>
   </div>
</body>

</html>